package com.fosss.band.mapper;

import com.fosss.band.entity.Follow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: fosss
 * Date: 2023/12/27
 * Time: 20:32
 * Description:
 */
@Mapper
public interface FollowMapper {
    Follow select(@Param("userId") Integer userId, @Param("type") Integer type, @Param("entityId") Integer entityId);

    void insert(Follow follow);

    void deleteById(@Param("id") Integer id);

    /**
     * 根据用户id和实体类型查询实体id
     */
    List<Integer> selectEntityId(@Param("userId") Integer userId, @Param("type") Integer type);
}
